<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="./tpl/xiao/css/style.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="./tpl/xiao/js/jquery.min.js"></script>
<script type="text/javascript" src="./tpl/editor/kindeditor-min.js"></script>
<script type="text/javascript" src="./tpl/editor/lang/zh_CN.js"></script>
<script language="javascript">
/*{spUrl c=sfile a=save_edit}*/
jQuery(function(){
	jQuery("#save_btn").click(function(){
		//var c=jQuery('#fp').attr("value");
		//alert(c);
		jQuery.post("{spUrl c=sfile a=save_edit}",{
					//a:jQuery('#fc').val()
					//'fpath':jQuery('#fp').attr("value"),
					//'fname':jQuery('input[name="fname"]').attr("value")
					file_content:document.getElementById('fc').value
					},
					function(data,textStatus){
						//jQuery("#infomation").html(jQuery('#fc').text());
						//jQuery("#infomation").html(jQuery('#fc').html());
						jQuery("#infomation").html(data);
						//alert(data.result);
					},"text");
		//jQuery("#infomation").html("保存成功");
		 });
		
		   });
</script>
<script>
			var editor;
			KindEditor.ready(function(K) {
				//editor = K.create('textarea[name="content"]', {
				editor=K.create('textarea[name="file_content"]',{
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : false,
					/*items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'image', 'link']*/
				});
				editor.sync();
			});
		</script>
</head>

<body>
<form action="" method="post" name="myform">
	<table width="600" cellspacing="0" class="sub">
		<tr>
			<td width="20%"  style="padding-left:10px" align="right">文件名和目录：</td>
			<td width="40%" align="left">{$filename}</td>
		</tr>
		<tr>
			<td colspan="2">
			<textarea name='file_content' cols="40" rows="10" id="fc" style="width:60%;height:250px; margin:8px; font-family:'宋体'">{$file_c}</textarea>
			</td>
		</tr>
		<tr class="bg2"><td colspan="2" align="center"><input type="button" class="button"  value="保存修改"  id="save_btn"/> </td></tr>
	</table>
    <input type="hidden" name="fpath" value="{$fpath}"  id="fp"/>
    <input type="hidden" name="fname" value="{$fname}" />
</form>
	</div>
    <div class="ajaxbox"><span id="infomation"></span></div>
</div>
</body>
</html>